<?php
namespace Yzadmin\Controller;
use Think\Controller;

class CkController extends Controller
{
   //检查登陆状态
   public function _initialize()
   { 
     //session读取
     $SESSION=session("admin");
     /*
     if(CONTROLLER_NAME=="Upload"){ 
         $username= I('post.username');
         $userid= I('post.userid');
         echo $username;
         echo $userid;
         echo $SESSION['username'];
         die();
     }*/
     $username=cookie('admin_username');
     if(empty($username))
      { 
        $this->error("Session失效,请重新登录!!!",U("Login/index"));
      }
      //Rbac权限检查
   }
}
